package br.com.future.util;

import java.text.ParseException;

import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import br.com.future.bo.TituloBO;
import br.com.future.log4j.Log4j;

public class TituloJob implements Job {
	
	//chamando o metodo da classe Log4j.
	static Logger logger = Logger.getLogger(Log4j.class);

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException{
		System.out.println(">>>>>>>>>>>>>>Executando Tarefa De controle de pagamentos");
		try {
			TituloBO.controlarAtraso();
		} catch (ParseException e) {
			e.printStackTrace();
			//chamando a mensagem.
			logger.error(e.getMessage());
		}
	}
}
